<?php

/**
 * Chatroom form base class.
 *
 * @package    alika
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseChatroomForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'from_id'    => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'to_id'      => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'pub'        => new sfWidgetFormInput(),
      'accept'     => new sfWidgetFormInputCheckbox(),
      'minute'     => new sfWidgetFormInput(),
      'created_at' => new sfWidgetFormDate(),
      'is_active'  => new sfWidgetFormInputCheckbox(),
      'time'       => new sfWidgetFormInput(),
      'time_start' => new sfWidgetFormInput(),
      'time_end'   => new sfWidgetFormInput(),
      'date_start' => new sfWidgetFormDateTime(),
      'date_end'   => new sfWidgetFormDateTime(),
      'with_video' => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorPropelChoice(array('model' => 'Chatroom', 'column' => 'id', 'required' => false)),
      'from_id'    => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'to_id'      => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id', 'required' => false)),
      'pub'        => new sfValidatorInteger(array('required' => false)),
      'accept'     => new sfValidatorBoolean(),
      'minute'     => new sfValidatorInteger(array('required' => false)),
      'created_at' => new sfValidatorDate(array('required' => false)),
      'is_active'  => new sfValidatorBoolean(),
      'time'       => new sfValidatorInteger(array('required' => false)),
      'time_start' => new sfValidatorInteger(array('required' => false)),
      'time_end'   => new sfValidatorInteger(array('required' => false)),
      'date_start' => new sfValidatorDateTime(array('required' => false)),
      'date_end'   => new sfValidatorDateTime(array('required' => false)),
      'with_video' => new sfValidatorBoolean(),
    ));

    $this->widgetSchema->setNameFormat('chatroom[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Chatroom';
  }


}
